#ifndef _WIN32
	#include <unistd.h>
#else
	#include <windows.h>
	#define sleep(x) Sleep(x * 1000)
#endif

#include <string>
#include "QuoteHandler.h"
using namespace std;

int main()
{
	CSHZdMarketApi *apiHandle = CSHZdMarketApi::CreateSHZdMarketApi("./tmp/marketLog", false);
	QuoteHandler quote_handler(apiHandle);
	
	sleep(5);
	char *ppInstrumentID[4];
	/*ppInstrumentID[0] = (char*)"HKEX,HHI1802;HKEX,HHI1803;HKEX,HHI1804;HKEX,HHI1805;HKEX,HHI1806";
	ppInstrumentID[1] = (char*)"HKEX,HHI1807;HKEX,HHI1808;HKEX,HHI1809;HKEX,HHI1810";
	ppInstrumentID[2] = (char*)"HKEX,HSI1802;HKEX,HSI1803;HKEX,HSI1804;HKEX,HSI1805;HKEX,HSI1806";
	ppInstrumentID[3] = (char*)"HKEX,HSI1807;HKEX,HSI1808;HKEX,HSI1809;HKEX,HSI1810";
	apiHandle->SubscribeMarketData(ppInstrumentID, 4);*/

	ppInstrumentID[0] = (char*)"LME,NI3M";
	apiHandle->SubscribeMarketData(ppInstrumentID, 1);

	while (true) {
		sleep(5);
	}
	apiHandle->Release();
	return 0;
}

